<?=$headerHtml?>
<style>
    .advtitle{display:none;}
</style>
<script>
    var showAdvAttr = function(){
        $(".advtitle").toggle();
    }
</script>
        <div class="container">
                <h2 class="admintitle">文章详细信息</h2>
                    <div class="mainbox nomargin">
                        <form method="post" action="index.php"  onsubmit="return Zvalidator.checkForm(this)">
                            <input type="hidden" value="<?=$ctlName?>" name="c"/>
                            <input type="hidden" value="Add" name="a"/> 
                            <input type="hidden" value="<?=$id?>" name="id"/> 
                            <input type="hidden" value="<?=$appId?>" name="appId"/>
                            <table class="opt">
                                <tbody>
                                <tr>
                                    <td width="80">所属APP:</td>
                                    <td>
                                    <select name="appId" id="appId" style="width:200px;" validator="require">
                                            <?
                                            if($appCache){
                                                foreach($appCache as $app ){
                                                    $selCss = $appId == $app['id'] ? ' selected' : '';
                                                    echo '<option value="'.$app['id'].'" '.$selCss.'>'.$app['cnName'].'</option>';
                                                }
                                            }
                                            ?>
                                    </select>

                                    </td>
                                </tr>
                                <tr>
                                    <td>所属分类:</td>
                                    <td>
                                        <?
                                            $options = array(
                                                'id'   => 'classId',
                                                'name' => 'item[classId]',
                                                'data' => $classCache,
                                                'key'  => $dataInfo['classId'],
                                                'otherstr'=>'validator="require"'
                                            );
                                            echo Libs_GlobalFunc::createSelectElement($options);
                                        ?>
                                        <select name="item[subClassId]" id="subClassId"><option value="0">=请选择=</option></select>
                                        <select name="item[grandClassId]" id="grandClassId"><option value="0">=请选择=</option></select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>标题:</td>
                                    <td><input type="text" value="<?=$dataInfo['title']?>" name="item[title]" id="title" validator="require" class="doctxt txt"  > <a href="javascript:void(0);" onclick="showAdvAttr()">高级属性</a></td>
                                </tr>
                                <tr class="advtitle">
                                    <td>SEO关键字:</td>
                                    <td><input type="text" value="<?=$dataInfo['keywords']?>" name="item[keywords]" id="keywords" class="doctxt txt"></td>
                                </tr>
                                <tr class="advtitle">
                                    <td>SEO描述:</td>
                                    <td><input type="text" value="<?=$dataInfo['description']?>" name="item[description]" id="description" class="doctxt txt"></td>
                                </tr>
                                <tr>
                                    <td>英文文件名:</td>
                                    <td><input type="text" value="<?=$dataInfo['enfile']?>" name="item[enfile]" id="enfile" class="doctxt txt" style="width:160px"  validator="require">.html</td>
                                </tr>
                                <tr>
                                    <th colspan="2">内容:</th>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <textarea id="content" name="content" width="400" height="80" ><?=$content?></textarea>
                                    </td>
                                   
                                </tr>
                                </tbody>
                            </table>
                            <div class="opt">
                                <label title="==保存文章的同时发布文章=="><input type="checkbox" value="1" name="quickPub" checked="true"/>同时发布文章</label><input type="submit" tabindex="3" class="btn" value=" 确认修改 " name="submit" style="width:150px;">

                                <a target="_blank" href="index.php?c=Cms_Document&a=Publish&id=<?=$id?>&appId=<?=$appId?>" title="== 发布之前请确认已经保存修改!! ==" style="margin-left:450px; ">发布文章</a> |
                                <a target="_blank" href="index.php?c=Cms_Create&a=List&appId=<?=$appId?>&classId=<?=$dataInfo['classId']?>">发布列表页</a> |
                                <a target="_blank" href="index.php?c=Cms_Create&a=Index&appId=<?=$appId?>">发布首页</a>
                            </div>
                        </form>
                    </div>
               
        </div>

        <script type="text/javascript" src="editor/ckeditor.js"></script>
        <script>
            CKEDITOR.replace( 'content', {
                toolbar : 'CMS',
                width : 900,
                height : 500
            } );
        </script>
        <script language="javascript">
        $(document).ready(function(){
            /*表单验证*/
            Zvalidator.init();
         });
        </script>
    </body>
</html>
